/*
 * Copyright (c) 2012 Keerthi Ramachandran .
 */
package com.kee.example.domain;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * This class... todo (RK) javadoc
 *
 * @author <a href="mailto:Keerthi.Ramachandran@navis.com">Keerthi Ramachandran</a>, 8/21/12
 * @since 2.4. /2012-08-21
 */
public class OrderKey implements Serializable {
    private long orderId;
    private OrderTypeEnm orderType;

    public OrderKey() {
    }

    public OrderKey(long inOrderId, OrderTypeEnm inOrderType) {
        orderId = inOrderId;
        orderType = inOrderType;
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long inOrderId) {
        orderId = inOrderId;
    }

    public OrderTypeEnm getOrderType() {
        return orderType;
    }

    public void setOrderType(OrderTypeEnm inOrderType) {
        orderType = inOrderType;
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().append(this.orderId).append(this.orderType).toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final OrderKey other = (OrderKey) obj;
        return new EqualsBuilder().append(this.orderId, other.orderId).append(this.orderType, other.orderType).isEquals();
    }
}
